﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace pufflesweb
{
    public partial class single_help : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                PModel.User mysuer = new PModel.User();
                mysuer = (PModel.User)PF.SessionHelper.GetSession("user");
                string HID = Request.QueryString["HID"];
                PModel.Help help = PBLL.Help.Getuser(int.Parse(HID));

                string state = "";
                if (help.Hstate == 0)
                {
                    state = "救助中";
                }
                else if (help.Hstate == 1)
                {
                    state = "可领养";
                }
                else if (help.Hstate == 2)
                {
                    state = "已领养";
                }
                else if (help.Hstate == 3)
                {
                    state = "安乐死";
                }

                string vaccine = "";
                if (help.Hvaccine == 0)
                {
                    vaccine = "未注射";
                }
                else if (help.Hvaccine == 1)
                {
                    vaccine = "一针";
                }
                else if (help.Hvaccine == 2)
                {
                    vaccine = "两针";
                }
                else if (help.Hvaccine == 3)
                {
                    vaccine = "三针";
                }
                else if (help.Hvaccine == 4)
                {
                    vaccine = "三针+狂犬疫苗";
                }
                hname.Text = help.Hname+"|";
                hstate.Text = state+ "|";
                hvaccine.Text = vaccine;
                htxet.Text = help.Htext;
                himage.Text = help.Himage;
            }
        }
    }
}